<template>
  <div id="app">
    <fzac-head v-if="isshow"></fzac-head>
    <router-view/>
  </div>
</template>

<script>
  import FzacHead from './components/base/head';
  import {mapGetters} from 'vuex';

  export default {
    data() {
      return {
        isshow: true
      }
    },
    name: 'App',
    components: {
      FzacHead
    },
    computed: {
      ...mapGetters({
        fzactoast: 'base/fzactoast',
        toastMark: 'base/toastMark',
        fzacnotify: 'base/fzacnotify',
        notifyMark: 'base/notifyMark'
      }),
    },
    methods: {},
    watch: {
      toastMark: {
        handler(curval) {
          if (curval != 0) {
            this.$toast(this.fzactoast)
          }
        },
        deep: true,
        immediate: true
      },
      notifyMark:{
        handler(curval) {
          if (curval != 0) {
            this.$notify(this.fzacnotify)
          }
        },
        deep: true,
        immediate: true
      }
    },
    mounted(){
      if(this.$router.currentRoute.path=='/login'){
        this.isshow = false;
      }
    },
  }
</script>


<style>
  #app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
  }

</style>
